package com.wujing.scat.biz.order.controller;

import com.wujing.scat.biz.order.api.PriceFeignClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Value("${spring.application.name}")
    private String applicationName;


    @Resource
    private PriceFeignClient priceFeignClient;

    @GetMapping("/v1/get_application_name")
    public String getApplicationName() {
        return applicationName + " call " + priceFeignClient.getApplicationName();
    }
}
